<ul class="nav nav-tabs">
  <li class=active> <%= link_to tag_icon(:list, pat(:list)), url(:users, :index) %></li>
  <li> <%= link_to tag_icon(:plus, pat(:new)), url(:users, :new) %></li>
</ul>
<div class=tabs-content>
  <table id=list class="table table-striped table-hover table-condensed">
    <thead>
      <tr>
        <th class="header list-menu">
          <div class=dropdown>
            <a href="#" class="list-menu-toggle dropdown-toggle" data-toggle='dropdown'>
              <%= tag_icon :magic %> <span class=caret></span>
            </a>
            <ul class="list-menu dropdown-menu" role=menu>
              <li class=list-menu-wrapper>
                <%= link_to tag_icon('check-square-o', pat(:select_all)), '#', :id => 'select-all', :class => 'list-menu-link' %>
              </li>
              <li class=list-menu-wrapper.list-menu-wrapper-disabled>
                <%= link_to tag_icon('square-o', pat(:deselect_all)), '#', :id => 'deselect-all', :class => 'list-menu-link list-menu-link-disabled' %>
              </li>
              <li class="list-menu-divider divider"></li>
              <li class=list-menu-wrapper.list-menu-wrapper-disabled>
                <%=link_to tag_icon('trash-o', pat(:delete_selected)), '#', :id => 'delete-selected', :class => 'list-menu-link list-menu-link-disabled' %>
                <div class='list-menu-popover-delete-selected popover right'>
                  <div class=arrow></div>
                  <h3 class=popover-title><%= pat(:delete_selected_title) %></h3>
                  <div class=popover-content>
                    <% form_tag url(:users, :destroy_many), :method => :delete do %>
                      <%=hidden_field_tag :user_ids, :'data-delete-many-ids' => true %>
                      <%=submit_tag pat(:delete), :class =>'list-menu-popover-delete-selected-btn btn btn-danger btn-small' %>
                      <div class='btn btn-default btn-small cancel'><%= pat(:cancel) %></div>
                    <% end %>
                  </div>
                </div>
              </li>
            </ul>
          </div>
        </th>
                <th class=header> <%= mat(:user, :created_at) %></th>
                <th class=header> <%= mat(:user, :updated_at) %></th>
                <th class=header> <%= mat(:user, :username) %></th>
                <th class=header> <%= mat(:user, :crypted_pass) %></th>
                <th class=header> <%= mat(:user, :email) %></th>
                <th class=header> <%= mat(:user, :mobile) %></th>
                <th class=header> <%= mat(:user, :crypted_password) %></th>
                <th class="header list-row-action-header"></th>
      </tr>
    </thead>

    <tbody>
      <% @users.each do |user| %>
        <tr class=list-row>
          <td class="list-column list-selectable">
            <%= check_box_tag 'user_ids[]', :value => user.id, :class => 'list-selectable-checkbox' %>
           </td>
          <td class=list-column> <%= time_ago_in_words user.created_at %></td>
          <td class=list-column> <%= time_ago_in_words user.updated_at %></td>
          <td class=list-column> <%= user.username %> </td>
          <td class=list-column> <%= user.crypted_pass %> </td>
          <td class=list-column> <%= user.email %> </td>
          <td class=list-column> <%= user.mobile %> </td>
          <td class=list-column> <%= user.crypted_password %> </td>
          <td class="list-column list-row-action">
            <div class='list-row-action-wrapper'>
               <%= link_to tag_icon(:edit), :href => url(:users, :edit, :id => user.id), :rel => :tooltip, :title => "#{pat(:edit)} user", :class => 'list-row-action-wrapper-link' %>
               <%= link_to tag_icon('trash-o'), :rel => :tooltip, :title => "#{pat(:delete)} user", :class => 'list-row-action-delete-one list-row-action-wrapper-link' %>
               <div class="popover list-row-action-popover-delete-one left">
                 <div class=arrow> </div>
                 <h3 class=popover-title><%= pat(:delete, :model => "user") %></h3>
                 <div class=popover-content>
                   <% form_tag url(:users, :destroy, :id => user.id), :method => :delete do %>
                     <%= submit_tag pat(:delete), :class =>'list-row-action-popover-delete-one-btn btn btn-danger btn-small' %>
                     <div class="btn btn-default btn-small cancel"><%= pat(:cancel) %></div>
                   <% end %>
                 </div>
               </div>
             </div>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
